package com.yuji.aacar.widgets.dialogue;

import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;


/**
 * Created by yehaijian on 2017/1/4.
 */

public class LoadDialog extends AlertDialog {
    private View view;

    public LoadDialog(Context context) {
        super(context);
//        LayoutInflater inflater = LayoutInflater.from(getContext());
//        view = inflater.inflate(R.layout.progress_load, null);
//        view.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
//            @Override
//            public boolean onPreDraw() {
//                getWindow().setLayout(view.getWidth(), view.getHeight());
//                getWindow().setGravity(Gravity.CENTER);
//                getWindow().setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.my_shape));
//                view.getViewTreeObserver().removeOnPreDrawListener(this);
//                return false;
//            }
//        });
    }

    protected LoadDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    protected LoadDialog(Context context, int themeResId) {
        super(context, themeResId);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


    }

    @Override
    public void show() {
        super.show();
//        setContentView(view);
    }
}
